<?php

namespace App\models;

use System\Core\Model;

class Admin extends Model
{
    protected $table = 'admins';

    public function findByUserName($data) {
        $sql = "SELECT admin_name FROM {$this->table} WHERE admin_name = :admin_name AND admin_pass = :admin_pass";
        return $this->db->query($sql,$data)->fetch();
    }
}
